import java.awt.image.BufferedImage;

public class Attack extends TotalObject{
    int attacktype;
    public Attack(int x, int y, int direction, int attackmode) {
        super(x, y, 15, 15, 1,5);
        this.movedirection = direction;
        this.attacktype = attackmode;
        if (this.movedirection==TotalObject.RIGHT){
            this.x+=80;
        }
        if (this.movedirection==TotalObject.LEFT)this.x-=30;

    }

    @Override
    public void reducelife() {
        life--;
    }

    @Override
    public BufferedImage getImage() {
        return null;
    }

    public void step(){
        if (attacktype == farattack){
            if (this.movedirection==TotalObject.RIGHT){
                this.x+=speed;
            }
            if (this.movedirection==TotalObject.LEFT){
                this.x-=speed;
            }
        }
    }
}
